package com.company.modules.project.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.company.modules.project.dao.CompanyMapper;
import com.company.modules.project.entity.Company;
import com.company.modules.project.service.CompanyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author Xmirror
* @description 针对表【company(公司)】的数据库操作Service实现
* @createDate 2022-02-26 13:25:19
*/
@Service
public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company>
implements CompanyService {

    @Autowired
    private CompanyMapper companyMapper;

    @Override
    public Company findCompanyById(Integer id) {
        Company company = new Company();
        company.setId(id);
        Wrapper<Company> wrapper = new QueryWrapper<>(company);
        return companyMapper.selectOne(wrapper);
    }

    @Override
    public List<Company> findCompanyList() {
        return null;
    }
}
